package com.kyrioscraft.cloud.thead.jdklab.tools.singletom;

/**
 * @Author kyrioscraft
 * @Date 2019/2/22 10:42
 * @Description 静态内部类实例化单例
 **/
public class StaticSingleton {
    private StaticSingleton() {
        System.out.println("StaticSingletom is create");
    }
    private static class SingletomHolder {
        private static StaticSingleton instance = new StaticSingleton();
    }
    public static StaticSingleton getInstance() {
        return SingletomHolder.instance;
    }
}
